<?php
return [
    'traceLevel' => 0,
    'flushInterval' => 1,
    'targets' => [
        [
            'class' => 'yii\log\FileTarget',
            'exportInterval' => 1,
            'levels' => ['error', 'warning'],
            'logVars' => ['*'],
            //'categories' => ['application'],
            'logFile' => '@runtime/logs/'.date('Y-m-d').'/error.log',
            'maxFileSize' => 1024 * 20,//设置文件大小，以kb为单位
            'maxLogFiles' => 20
        ],
        [
            'class' => 'yii\log\FileTarget',
            'exportInterval' => 1,
            'levels' => ['info'],
            'categories' => ['myinfo'],
            'logVars' => ['*'],
            'logFile'=>'@runtime/logs/'.date('Y-m-d').'/info.log',
            'maxFileSize' => 1024 * 20,//设置文件大小，以kb为单位
            'maxLogFiles' => 20
        ],
    ]
];